# Figure S2: Alternative income threshold (agree/disagree)

fig4_dat2 = bind_rows(import(here("data","fig4_inc2_agree_dat.rds")) |> 
                        mutate(agree = "Agree"),
                      import(here("data","fig4_inc_disagree2_dat.rds")) |> 
                        mutate(agree = "Disagree")) |> 
  invert_group() |> fix_healthcare()

fig_inc2_agree = plot_conjoint(conjoint = fig4_dat2 |> 
                                 filter(agree == "Agree"),
                               is_result = T,
                               lab = policies, 
                               weights = dta_grp$demog_weight[!is.na(dta_grp$inc2_grp)],
                               use="for",
                               title=NULL,
                               grouped_data=T) +
  labs(subtitle = "Agree with Policy", x = NULL, y = NULL)

fig_inc2_disagree = plot_conjoint(conjoint = fig4_dat2 |> 
                                    filter(agree == "Disagree"),
                                  is_result = T,
                                  lab = policies, 
                                  weights = dta_grp$demog_weight[!is.na(dta_grp$inc2_grp)],
                                  use="against",
                                  title=NULL,
                                  grouped_data=T) +
  labs(subtitle = "Disagree with Policy", x = NULL, y = NULL)

fig_inc2_pts = fig_inc2_agree + fig_inc2_disagree

print(fig_inc2_pts)

ggsave(here("figures","appendix","figure_s2.png"), fig_inc2_pts,
       dpi = 600, units = "in", width = 10, height = 9)

ccat("See 'figure_s2.png' for Figure S2 output")